Event
objects.Event()The accepted input for an event in FloodAdapt.
Attributes
name : str-
The name of the event.
description : str-
The description of the event. Defaults to ““.
time : TimeFrame-
The time frame of the event.
template : Template-
The template of the event.
mode : Mode-
The mode of the event.
rainfall_multiplier : float-
The rainfall multiplier of the event.
forcings : dict[ForcingType, list[IForcing]]-
The forcings of the event.
Methods
| Name | Description |
|---|---|
| data_equivalent | Deep-compare two events, including forcing data contents. |
| get_forcings | Return a list of all forcings in the event. |
| save_additional | Save any additional files associated with the event. |
data_equivalent
objects.Event.data_equivalent(other: Event)Deep-compare two events, including forcing data contents.
Compares core attributes (time, template, mode, rainfall_multiplier) and then verifies that each forcing (by type) has the same data fingerprint. For path-based forcings, the fingerprint hashes the file bytes; for others, a canonical attribute-based hash is used.
Parameters
other : Event-
The event to compare against.
Returns
: bool-
True when events are equivalent in terms of their hazard inputs.
get_forcings
objects.Event.get_forcings()Return a list of all forcings in the event.
save_additional
objects.Event.save_additional(output_dir: Path | str | os.PathLike)Save any additional files associated with the event.